package controller

import (
	"github.com/gin-gonic/gin"
	"hytx_manager/models"
)

func Index(c *gin.Context) {
	articleExamineCount := models.ArticleExamineCount()
	mediaUserExamineCount := models.MediaUserExamineCount()

	userRecharge := models.UserRecharge()
	agentAmount := models.AgentAmount()
	todayUserRecharge := models.TodayUserRecharge()
	todayAgentFee := models.TodayAgentFee()
	thisMonthUserRecharge := models.ThisMonthUserRecharge()
	lastMonthUserRecharge := models.LastMonthUserRecharge()
	statistics := models.UserRechargeStatistics()
	render(c, gin.H{
		"article_examine_count":    articleExamineCount,
		"media_user_examine_count": mediaUserExamineCount,
		"income": gin.H{
			"user_recharge":            userRecharge,
			"agent_amount":             agentAmount,
			"today_user_recharge":      todayUserRecharge,
			"today_agent_fee":          todayAgentFee,
			"this_month_user_recharge": thisMonthUserRecharge,
			"last_month_user_recharge": lastMonthUserRecharge,
		},
		"statistics": statistics,
	})
}
